var validatorPhone = function(rule, value, callback) {
  if (value === '') {
    callback(new Error('请输入手机号码'))
  } else if (!/^1\d{10}$/.test(value)) {
    callback(new Error('请输入正确的手机号码'))
  } else {
    callback()
  }
}

const validate = {
  username: [{
    required: true,
    trigger: 'change'
    // validator: validatorPhone
  }
	  // { type: 'number', message: '请输入正确的手机号码' }
  ],
  password: [{ required: true, trigger: 'change', message: '请输入密码' }]
}
export default validate
